Skip to content

feat(cockpit): langgraph client-tools Node backend using @threadplane/middleware#674

Merged
blove merged 4 commits into
mainfrom
claude/langgraph-js-demo
Jun 17, 2026
Merged

feat(cockpit): langgraph client-tools Node backend using @threadplane/middleware#674
blove merged 4 commits into
mainfrom
claude/langgraph-js-demo

Conversation

@blove

@blove blove commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Adds a TypeScript/LangGraph.js backend to the langgraph client-tools demo — cockpit/langgraph/client-tools/node/ — the JS twin of ../python, built on the published @threadplane/middleware/langgraph.

The graph is the middleware: clientToolsChannel() declares the state channels, bindClientTools binds the browser-declared catalog onto the model, and clientToolsRouter([]) ends the turn on a client-tool call so the browser executes it. Served by langgraphjs dev --port 5308 on the same port + graph id (client-tools) as the Python backend, so the shared Angular frontend connects unchanged — only the backend runtime (Node vs Python) differs.

Live-LLM smoke ✅ (real OpenAI, all three tool kinds, zero console errors)

Drove the existing Angular frontend against this Node backend:

  • action get_weather → called → browser-executed → model summarized ("It's 68°F and sunny in Tokyo…")
  • view weather_card → Paris card rendered (59°F, Partly Cloudy, 60% / 10 mph) + continuation
  • ask confirm_booking → confirm card → froze to "Booking confirmed ✓" (ask-card freeze) + continuation

This is the deferred live demo, done over the native LangGraph transport (the AG-UI canonical demo is untouched — it keeps its Python server; there is no TypeScript AG-UI server in the repo).

Run: npm install && OPENAI_API_KEY=… npm run dev, then npx nx serve cockpit-langgraph-client-tools-angular --port 4308.

🤖 Generated with Claude Code

…/middleware)

JS/TS twin of cockpit/langgraph/client-tools/python — same graph behavior built
on @threadplane/middleware/langgraph (clientToolsChannel + bindClientTools +
clientToolsRouter). Served by langgraphjs dev on the same port (5308) and graph
id (client-tools) as the Python backend, so the shared Angular frontend connects
unchanged.

Scaffold complete; install + serve + live smoke land once @threadplane/middleware
is published to npm (the backend consumes the published package, mirroring how the
Python backend consumes the published PyPI package).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@blove blove enabled auto-merge (squash) June 16, 2026 21:34
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview, Comment Jun 17, 2026 12:45am

Request Review

@blove blove merged commit 22d6f2e into main Jun 17, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant